package com.fr.report.cellElement.core;

import com.fr.base.XMLable;
import com.fr.base.xml.XMLPrintWriter;
import com.fr.base.xml.XMLableReader;
import com.fr.data.condition.Condition;
import com.fr.data.core.DataXMLUtils;

public class ConditionGroup
  implements XMLable
{
  private String display;
  private Condition condition;

  public ConditionGroup()
  {
  }

  public ConditionGroup(String paramString, Condition paramCondition)
  {
    this.display = paramString;
    this.condition = paramCondition;
  }

  public String getDisplay()
  {
    return this.display;
  }

  public void setDisplay(String paramString)
  {
    this.display = paramString;
  }

  public Condition getCondition()
  {
    return this.condition;
  }

  public void setCondition(Condition paramCondition)
  {
    this.condition = paramCondition;
  }

  public void readXML(XMLableReader paramXMLableReader)
  {
    if (paramXMLableReader.isChildNode())
    {
      String str2 = paramXMLableReader.getTagName();
      if ("Display".equals(str2))
      {
        String str1;
        if ((str1 = paramXMLableReader.getElementValue()) != null)
          setDisplay(str1);
      }
      else if ("Condition".equals(str2))
      {
        this.condition = DataXMLUtils.readXMLCondition(paramXMLableReader);
      }
    }
  }

  public void writeXML(XMLPrintWriter paramXMLPrintWriter)
  {
    if (this.display != null)
      paramXMLPrintWriter.startTAG("Display").textNode(this.display).end();
    DataXMLUtils.writeXMLCondition(paramXMLPrintWriter, this.condition);
  }

  public Object clone()
    throws CloneNotSupportedException
  {
    ConditionGroup localConditionGroup = (ConditionGroup)super.clone();
    if (this.condition != null)
      localConditionGroup.setCondition((Condition)this.condition.clone());
    return localConditionGroup;
  }
}